<%-- 
    Document   : FeedViewDetail
    Created on : Nov 6, 2009, 11:48:50 PM
    Author     : Phong
--%>

<%@page contentType="text/html" pageEncoding="UTF-8" import="DAOClass.*,java.sql.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>FeedBack View</title>
    </head>
    <body>
        <%
            feedback f = new feedback();
            ResultSet result;
            int id = Integer.parseInt(request.getParameter("id"));
            result = f.getByID(id);
            f.updateStatus(id);
            String u = "";
            while (result.next()) {
                if (result.getString("UserName") != null) {
                    u = result.getString("UserName");
                } else {
                    u = "Khách Vãng Lai";
                }


            %>



        <form name="feedView" method="POST">
            <table border="1" width="100%">
                <thead>
                    <tr>
                        <th colspan="2">FeedBack View</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>From : </td>
                        <td><input type="text" name="name" value="<%=result.getString("FullName")%>" readonly="readonly" /></td>
                    </tr>
                    <tr>
                        <td>UserName : </td>
                        <td><input type="text" name="name" value="<%=u%>" readonly="readonly" /></td>
                    </tr>
                    <tr>

                        <td>Email : </td>
                        <td><input type="text" name="mail" value="<%=result.getString("Email")%>" readonly="readonly" /></td>
                    </tr>
                    <tr>
                        <td>Subject : </td>
                        <td><input type="text" name="subject" value="<%=result.getString("title")%>" readonly="readonly" /></td>
                    </tr>
                    <tr>
                        <td>Content : </td>
                        <td><textarea name="content" rows="4" cols="50" readonly="readonly">
                                <%=result.getString("Content")%>
                            </textarea></td>
                    </tr>
                    <tr>
                        <td>Date Send : </td>
                        <td><input type="text" name="date" value="<%=result.getString("DateSend")%>" readonly="readonly" /></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><a href="include/updateFeedback.jsp?id=<%=result.getInt("FeedBackID")%>" >
                                <input type="submit" value="- Xác Nhận -" name="ok" /></a>
                        </td>
                    </tr>
                </tbody>
            </table>

        </form>

                                <%
            }
        %>
    </body>
</html>
